{{define "admin/system/role_permission"}}
<div class="tabs-container" style="padding: 10px;">
    <ul class="nav nav-tabs">
    {{range $key,$val:= .Permissions}}
        <li {{if eq $key 0}}class="active"{{end}}>

            <a data-toggle="tab" href="#tab-{{$val.Id}}" {{if eq $key 0}}
               aria-expanded="true" {{else}} aria-expanded="false" {{end}}>
                <label class="checkbox-inline i-checks">
                    <input type="checkbox" data-child="tab-{{$val.Id}}"
                           value="{{$val.Id}}">{{$val.Title}}
                </label>
            </a>
        </li>
    {{end}}
    </ul>
    <div class="tab-content" style="height: 100px">
    {{range $key,$val:= .Permissions}}
        <div id="tab-{{$val.Id}}" class="tab-pane {{if eq $key 0}}active{{end}}">
            <div class="panel-body">
                <ul class="nav">
                {{range $val.Children}}
                    <li style="padding: 5px 0;display:block;float: left">
                        <label class="checkbox-inline i-checks"><input type="checkbox" value="{{.Id}}">{{.Title}}
                        </label>
                    </li>
                {{end}}
                </ul>
            </div>
        </div>
    {{end}}
    </div>
    <div class="col-sm-12" style="text-align: center">
        <button type="button" id="assignPermissions" data-id="" class="btn btn-md btn-success">保存</button>
    </div>
</div>
{{end}}